//处理列表页面的表格
(function(){
	if($(".dataTable")[0]){
		$(".dataTable").children("thead").find("th").each(function(){
			
			var text = $(this).html();
			var p = $("<p></p>").html(text).css({"white-space":"nowrap","line-height":"18px","height":"18px","margin":"0","padding":"0"});
			var width = $(this).attr("mwidth");
			if(width){
				width = parseInt(width);
				p.css({"min-width":width + "px"});
				
				/*if($(this).width() - 18 < width){	//左右的padding共16个px
					p.css({"width":width + "px"});
				}*/
			}
			$(this).empty().append(p);
		});
	}
})()

